<!DOCTYPE html><html><head>
      <title>2&#x9879;&#x76EE;&#x5E38;&#x89C4;&#x5F00;&#x53D1;&#x6D41;&#x7A0B;</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="file:///C:\Users\Administrator\.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.4.3\node_modules\@shd101wyy\mume\dependencies\katex\katex.min.css">
      
      

      
      
      
      
      
      

      <style>
      /**
 * prism.js Github theme based on GitHub's theme.
 * @author Sam Clarke
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #333;
  background: none;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.4;

  -moz-tab-size: 8;
  -o-tab-size: 8;
  tab-size: 8;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: .8em;
  overflow: auto;
  /* border: 1px solid #ddd; */
  border-radius: 3px;
  /* background: #fff; */
  background: #f5f5f5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
  background: #f5f5f5;
}

.token.comment,
.token.blockquote {
  color: #969896;
}

.token.cdata {
  color: #183691;
}

.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
  color: #333;
}

.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
  color: #a71d5d;
}

.token.string,
.token.url,
.token.regex,
.token.attr-value {
  color: #183691;
}

.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
  color: #0086b3;
}

.token.tag,
.token.selector,
.token.prolog {
  color: #63a35c;
}

.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
  color: #795da3;
}

.token.entity {
  cursor: help;
}

.token.title,
.token.title .token.punctuation {
  font-weight: bold;
  color: #1d3e81;
}

.token.list {
  color: #ed6a43;
}

.token.inserted {
  background-color: #eaffea;
  color: #55a532;
}

.token.deleted {
  background-color: #ffecec;
  color: #bd2c00;
}

.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}


/* JSON */
.language-json .token.property {
  color: #183691;
}

.language-markup .token.tag .token.punctuation {
  color: #333;
}

/* CSS */
code.language-css,
.language-css .token.function {
  color: #0086b3;
}

/* YAML */
.language-yaml .token.atrule {
  color: #63a35c;
}

code.language-yaml {
  color: #183691;
}

/* Ruby */
.language-ruby .token.function {
  color: #333;
}

/* Markdown */
.language-markdown .token.url {
  color: #795da3;
}

/* Makefile */
.language-makefile .token.symbol {
  color: #795da3;
}

.language-makefile .token.variable {
  color: #183691;
}

.language-makefile .token.builtin {
  color: #0086b3;
}

/* Bash */
.language-bash .token.keyword {
  color: #0086b3;
}

/* highlight */
pre[data-line] {
  position: relative;
  padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  display: block;
  width: 100%;
}

pre[data-line] .line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: hsla(24, 20%, 50%,.08);
  background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

pre[data-line] .line-highlight:before, 
pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  top: .4em;
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%,.4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% -  300px);padding:2em calc(50% - 457px -  150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
    </head>
    <body for="html-export">
      <div class="mume markdown-preview  ">
      <h1 class="mume-header" id="-%E5%89%8D%E7%AB%AF%E9%A1%B5%E9%9D%A2%E4%B8%8E%E5%86%85%E5%AE%B9%E5%88%86%E6%9E%90">:-: &#x524D;&#x7AEF;&#x9875;&#x9762;&#x4E0E;&#x5185;&#x5BB9;&#x5206;&#x6790;</h1>

<h3 class="mume-header" id="1-%E8%B5%84%E6%BA%90%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84">1&#x3001;&#x8D44;&#x6E90;&#x76EE;&#x5F55;&#x7ED3;&#x6784;</h3>

<ul>
<li><code>static</code>: &#x516C;&#x5171;&#x9759;&#x6001;&#x8D44;&#x6E90;&#x76EE;&#x5F55;,&#x5982;css,images,js</li>
</ul>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">// style<span class="token class">.css</span>&#x6587;&#x4EF6;
<span class="token class">.header</span></span> <span class="token punctuation">{</span>
	<span class="token property">background-color</span><span class="token punctuation">:</span> brown<span class="token punctuation">;</span>
	<span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">30</span><span class="token unit">px</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector"><span class="token class">.nav</span> li</span> <span class="token punctuation">{</span>
	<span class="token property">list-style</span><span class="token punctuation">:</span>none<span class="token punctuation">;</span>
	<span class="token property">min-width</span><span class="token punctuation">:</span><span class="token number">80</span><span class="token unit">px</span><span class="token punctuation">;</span>
	<span class="token property">line-height</span><span class="token punctuation">:</span> <span class="token number">30</span><span class="token unit">px</span><span class="token punctuation">;</span>
	<span class="token property">float</span><span class="token punctuation">:</span> left<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector"><span class="token class">.nav</span> li a</span> <span class="token punctuation">{</span>
	<span class="token property">text-decoration</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span>
	<span class="token property">color</span><span class="token punctuation">:</span> white<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector"><span class="token class">.nav</span></span> <span class="token punctuation">{</span>
	<span class="token property">overflow</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector"><span class="token class">.footer</span></span> <span class="token punctuation">{</span>
	<span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">30</span><span class="token unit">px</span><span class="token punctuation">;</span>
	<span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token hexcode">#636363</span><span class="token punctuation">;</span>
	<span class="token property">color</span><span class="token punctuation">:</span> white<span class="token punctuation">;</span>
	<span class="token property">text-align</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
	<span class="token property">line-height</span><span class="token punctuation">:</span> <span class="token number">30</span><span class="token unit">px</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><blockquote>
<p><code>image</code>&#x76EE;&#x5F55;&#xFF0C;&#x516C;&#x7528;&#x8D44;&#x6E90;&#x56FE;&#x7247;</p>
</blockquote>
<img src="http://kanyun.8car.net/php/1.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/4.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/7.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<hr>
<h3 class="mume-header" id="2-%E9%A6%96%E9%A1%B5%E5%88%B6%E4%BD%9C%E4%B8%8E%E9%A1%B5%E9%9D%A2%E6%8B%86%E5%88%86">2&#x3001;&#x9996;&#x9875;&#x5236;&#x4F5C;&#x4E0E;&#x9875;&#x9762;&#x62C6;&#x5206;</h3>

<h4 class="mume-header" id="21-%E7%9F%A5%E8%AF%86%E7%82%B9">2.1 &#x77E5;&#x8BC6;&#x70B9;</h4>

<ul>
<li>&#x6570;&#x7EC4;:
<ul>
<li>&#x7D22;&#x5F15;&#x6570;&#x7EC4;: &#x952E;&#x540D;&#x662F;&#x9ED8;&#x8BA4;&#x9012;&#x589E;&#x6574;&#x6570;&#x7D22;&#x5F15;</li>
<li>&#x5173;&#x8054;&#x6570;&#x7EC4;: &#x952E;&#x540D;&#x662F;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
</li>
<li>&#x6570;&#x7EC4;&#x6210;&#x5458;&#x7684;&#x8BBF;&#x95EE;: &#x6309;&#x952E;&#x540D;&#x8BBF;&#x95EE;</li>
<li>&#x6570;&#x7EC4;&#x7684;&#x904D;&#x5386;: foreach()</li>
<li>&#x4E8C;&#x7EF4;&#x6570;&#x7EC4;&#x7684;&#x5B9A;&#x4E49;&#x4E0E;&#x8BBF;&#x95EE;</li>
</ul>
<h4 class="mume-header" id="22-%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84">2.2 &#x76EE;&#x5F55;&#x7ED3;&#x6784;</h4>

<ul>
<li>&#x9996;&#x9875;: <code>index.php</code>,&#x6240;&#x6709;&#x680F;&#x76EE;&#x5185;&#x5BB9;&#x7684;&#x805A;&#x5408;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
	<span class="token comment">// &#x53D8;&#x91CF;</span>
	<span class="token variable">$headline</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&#x7535;&#x5F71;&apos;</span><span class="token punctuation">;</span>
	<span class="token variable">$copyright</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x5173;&#x8054;&#x6570;&#x7EC4;</span>
	<span class="token variable">$navs</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;&#x597D;&#x5267;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;om&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x7F8E;&#x731B;&#x7247;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x97E9;&#x65B0;&#x7247;&apos;</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x4E8C;&#x7EF4;&#x6570;&#x7EC4;</span>
	<span class="token variable">$movies</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x501A;&#x5929;&#x5C60;&#x9F99;&#x8BB0;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x90FD;&#x633A;&#x597D;&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x5982;&#x679C;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x7231;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x590D;&#x4EC7;&#x8005;&#x8054;&#x76DF;4&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x6CE2;&#x897F;&#x7C73;&#x4E9A;&#x72C2;&#x60F3;&#x66F2;&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x963F;&#x4E3D;&#x5854;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x60C5;&#x4E66;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x5929;&#x7A7A;&#x4E4B;&#x57CE;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x9F99;&#x732B;&apos;</span><span class="token punctuation">]</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token delimiter important">?&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token constant">DOCTYPE</span> html<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>html lang<span class="token operator">=</span><span class="token double-quoted-string string">&quot;en&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>head<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta charset<span class="token operator">=</span><span class="token double-quoted-string string">&quot;UTF-8&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>link rel<span class="token operator">=</span><span class="token double-quoted-string string">&quot;stylesheet&quot;</span> href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/static/css/style.css&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>title<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$headline</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>title<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>head<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>body<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5934;&#x90E8;&#x5BFC;&#x822A;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;header&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>ul <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;nav&quot;</span><span class="token operator">&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;index.php&quot;</span><span class="token operator">&gt;</span>&#x9996;&#x9875;<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$navs</span> <span class="token keyword">as</span> <span class="token variable">$key</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token variable">$nav</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
					<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$key</span></span>.&apos;.php&apos;; ?&gt;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$nav</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span><span class="token operator">/</span>ul<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x56FD;&#x4EA7;&#x539F;&#x521B;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;#&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x6B27;&#x7F8E;&#x731B;&#x7247;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;om&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;#&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x65E5;&#x97E9;&#x63A8;&#x8350;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;#&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5E95;&#x90E8;&#x7248;&#x6743;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;footer&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>p <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;copyright&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$copyright</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span> <span class="token operator">&amp;</span>copy<span class="token punctuation">;</span> &#x7248;&#x6743;&#x6240;&#x6709;<span class="token operator">&lt;</span><span class="token operator">/</span>p<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>body<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>html<span class="token operator">&gt;</span>
</pre><ul>
<li><code>gc.php</code>: [&#x680F;&#x76EE;&#x9875;] &#x56FD;&#x4EA7;&#x539F;&#x521B;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
	<span class="token comment">// &#x53D8;&#x91CF;</span>
	<span class="token variable">$copyright</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x521B;&#x5EFA;&#x4E8C;&#x4E2A;&#x53D8;&#x91CF;&#x6765;&#x4FDD;&#x5B58;&#x9875;&#x9762;&#x4E2D;&#x7684;&#x52A8;&#x6001;&#x5185;&#x5BB9;</span>
	<span class="token variable">$movies</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x501A;&#x5929;&#x5C60;&#x9F99;&#x8BB0;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x90FD;&#x633A;&#x597D;&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x5982;&#x679C;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x7231;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x680F;&#x76EE;&#x6570;&#x7EC4;&#x7684;&#x952E;&#x540D;&#x4E0E;&#x680F;&#x76EE;&#x6587;&#x4EF6;&#x540C;&#x540D;</span>
	<span class="token variable">$navs</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;&#x597D;&#x5267;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;om&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x7F8E;&#x731B;&#x7247;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x97E9;&#x65B0;&#x7247;&apos;</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token delimiter important">?&gt;</span>

<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token constant">DOCTYPE</span> html<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>html lang<span class="token operator">=</span><span class="token double-quoted-string string">&quot;en&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>head<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta charset<span class="token operator">=</span><span class="token double-quoted-string string">&quot;UTF-8&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>link rel<span class="token operator">=</span><span class="token double-quoted-string string">&quot;stylesheet&quot;</span> href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/static/css/style.css&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>title<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>title<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>head<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>body<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5934;&#x90E8;&#x5BFC;&#x822A;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;header&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>ul <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;nav&quot;</span><span class="token operator">&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;index.php&quot;</span><span class="token operator">&gt;</span>&#x9996;&#x9875;<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$navs</span> <span class="token keyword">as</span> <span class="token variable">$key</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token variable">$nav</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
					<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$key</span></span>.&apos;.php&apos;; ?&gt;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$nav</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span><span class="token operator">/</span>ul<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>img src<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/images/1.jpg&quot;</span> alt<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span> width<span class="token operator">=</span><span class="token double-quoted-string string">&quot;300&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5BF9;&#x4E8E;&#x6570;&#x7EC4;<span class="token punctuation">,</span>&#x5FAA;&#x73AF;&#x904D;&#x5386;&#x66F4;&#x65B9;&#x4FBF;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5E95;&#x90E8;&#x7248;&#x6743;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;footer&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>p <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;copyright&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$copyright</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&amp;</span>copy<span class="token punctuation">;</span> &#x7248;&#x6743;&#x6240;&#x6709;<span class="token operator">&lt;</span><span class="token operator">/</span>p<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>body<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>html<span class="token operator">&gt;</span>
</pre><ul>
<li><code>om.php</code>: [&#x680F;&#x76EE;&#x9875;] &#x6B27;&#x7F8E;&#x731B;&#x7247;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
	<span class="token variable">$copyright</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x521B;&#x5EFA;&#x4E8C;&#x4E2A;&#x53D8;&#x91CF;&#x6765;&#x4FDD;&#x5B58;&#x9875;&#x9762;&#x4E2D;&#x7684;&#x52A8;&#x6001;&#x5185;&#x5BB9;</span>
	<span class="token variable">$movies</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x590D;&#x4EC7;&#x8005;&#x8054;&#x76DF;4&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x6CE2;&#x897F;&#x7C73;&#x4E9A;&#x72C2;&#x60F3;&#x66F2;&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x963F;&#x4E3D;&#x5854;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x680F;&#x76EE;&#x6570;&#x7EC4;&#x7684;&#x952E;&#x540D;&#x4E0E;&#x680F;&#x76EE;&#x6587;&#x4EF6;&#x540C;&#x540D;</span>
	<span class="token variable">$navs</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;&#x597D;&#x5267;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;om&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x7F8E;&#x731B;&#x7247;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x97E9;&#x65B0;&#x7247;&apos;</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token delimiter important">?&gt;</span>

<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token constant">DOCTYPE</span> html<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>html lang<span class="token operator">=</span><span class="token double-quoted-string string">&quot;en&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>head<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta charset<span class="token operator">=</span><span class="token double-quoted-string string">&quot;UTF-8&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>link rel<span class="token operator">=</span><span class="token double-quoted-string string">&quot;stylesheet&quot;</span> href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/static/css/style.css&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>title<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;om&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>title<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>head<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>body<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5934;&#x90E8;&#x5BFC;&#x822A;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;header&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>ul <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;nav&quot;</span><span class="token operator">&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;index.php&quot;</span><span class="token operator">&gt;</span>&#x9996;&#x9875;<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$navs</span> <span class="token keyword">as</span> <span class="token variable">$key</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token variable">$nav</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
					<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$key</span></span>.&apos;.php&apos;; ?&gt;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$nav</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span><span class="token operator">/</span>ul<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;om&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>img src<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/images/4.jpg&quot;</span> alt<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span> width<span class="token operator">=</span><span class="token double-quoted-string string">&quot;300&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5BF9;&#x4E8E;&#x6570;&#x7EC4;<span class="token punctuation">,</span>&#x5FAA;&#x73AF;&#x904D;&#x5386;&#x66F4;&#x65B9;&#x4FBF;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5E95;&#x90E8;&#x7248;&#x6743;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;footer&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>p <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;copyright&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$copyright</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&amp;</span>copy<span class="token punctuation">;</span> &#x7248;&#x6743;&#x6240;&#x6709;<span class="token operator">&lt;</span><span class="token operator">/</span>p<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>body<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>html<span class="token operator">&gt;</span>
</pre><ul>
<li><code>rh.php</code>: [&#x680F;&#x76EE;&#x9875;] &#x65E5;&#x97E9;&#x63A8;&#x8350;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
	<span class="token variable">$copyright</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x521B;&#x5EFA;&#x4E8C;&#x4E2A;&#x53D8;&#x91CF;&#x6765;&#x4FDD;&#x5B58;&#x9875;&#x9762;&#x4E2D;&#x7684;&#x52A8;&#x6001;&#x5185;&#x5BB9;</span>
	<span class="token variable">$movies</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x60C5;&#x4E66;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x5929;&#x7A7A;&#x4E4B;&#x57CE;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x9F99;&#x732B;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x680F;&#x76EE;&#x6570;&#x7EC4;&#x7684;&#x952E;&#x540D;&#x4E0E;&#x680F;&#x76EE;&#x6587;&#x4EF6;&#x540C;&#x540D;</span>
	<span class="token variable">$navs</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;&#x597D;&#x5267;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;om&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x7F8E;&#x731B;&#x7247;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x97E9;&#x65B0;&#x7247;&apos;</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token delimiter important">?&gt;</span>

<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token constant">DOCTYPE</span> html<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>html lang<span class="token operator">=</span><span class="token double-quoted-string string">&quot;en&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>head<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta charset<span class="token operator">=</span><span class="token double-quoted-string string">&quot;UTF-8&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>link rel<span class="token operator">=</span><span class="token double-quoted-string string">&quot;stylesheet&quot;</span> href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/static/css/style.css&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>title<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>title<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>head<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>body<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5934;&#x90E8;&#x5BFC;&#x822A;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;header&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>ul <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;nav&quot;</span><span class="token operator">&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;index.php&quot;</span><span class="token operator">&gt;</span>&#x9996;&#x9875;<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$navs</span> <span class="token keyword">as</span> <span class="token variable">$key</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token variable">$nav</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
					<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$key</span></span>.&apos;.php&apos;; ?&gt;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$nav</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span><span class="token operator">/</span>ul<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>img src<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/images/7.jpg&quot;</span> alt<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span> width<span class="token operator">=</span><span class="token double-quoted-string string">&quot;300&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5BF9;&#x4E8E;&#x6570;&#x7EC4;<span class="token punctuation">,</span>&#x5FAA;&#x73AF;&#x904D;&#x5386;&#x66F4;&#x65B9;&#x4FBF;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
			<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5E95;&#x90E8;&#x7248;&#x6743;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;footer&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>p <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;copyright&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$copyright</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span> <span class="token operator">&amp;</span>copy<span class="token punctuation">;</span> &#x7248;&#x6743;&#x6240;&#x6709;<span class="token operator">&lt;</span><span class="token operator">/</span>p<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>body<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>html<span class="token operator">&gt;</span>
</pre><hr>
<h2 class="mume-header" id="-%E5%88%86%E7%A6%BB%E9%A1%B5%E9%9D%A2%E5%85%AC%E5%85%B1%E9%83%A8%E5%88%86">:-:  &#x5206;&#x79BB;&#x9875;&#x9762;&#x516C;&#x5171;&#x90E8;&#x5206;</h2>

<h3 class="mume-header" id="31-%E7%9F%A5%E8%AF%86%E7%82%B9">3.1 &#x77E5;&#x8BC6;&#x70B9;</h3>

<ul>
<li>&#x9875;&#x9762;&#x516C;&#x5171;&#x90E8;&#x5206;&#x5206;&#x79BB;&#x7684;&#x4F18;&#x70B9;</li>
<li>&#x5916;&#x90E8;&#x6587;&#x4EF6;&#x52A0;&#x8F7D;&#x8BED;&#x53E5;:
<ul>
<li><code>include</code>: &#x52A0;&#x8F7D;&#x5931;&#x8D25;,&#x4E0D;&#x4F1A;&#x7EC8;&#x6B62;&#x5F53;&#x524D;&#x811A;&#x672C;,&#x53EA;&#x4F1A;&#x53D1;&#x51FA;&#x8B66;&#x544A;</li>
<li><code>require</code>: &#x52A0;&#x8F7D;&#x5931;&#x8D25;, &#x7EC8;&#x6B62;&#x5F53;&#x524D;&#x811A;&#x672C;&#x7684;&#x6267;&#x884C;,&#x662F;&#x81F4;&#x547D;&#x9519;&#x8BEF;</li>
<li><code>include_once / require_once</code>: &#x4EC5;&#x5141;&#x8BB8;&#x52A0;&#x8F7D;&#x4E00;&#x6B21;</li>
</ul>
</li>
</ul>
<blockquote>
<p><code>image</code>&#x76EE;&#x5F55;&#xFF0C;&#x516C;&#x7528;&#x8D44;&#x6E90;&#x56FE;&#x7247;</p>
</blockquote>
<img src="http://kanyun.8car.net/php/1.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/2.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/3.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/4.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/5.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/6.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/7.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/8.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<img src="http://kanyun.8car.net/php/9.jpg" width="100" height="100" alt="&#x56FE;&#x7247;&#x540D;&#x79F0;" align="center">
<h3 class="mume-header" id="32-%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84">3.2 &#x76EE;&#x5F55;&#x7ED3;&#x6784;</h3>

<ul>
<li><code>inc/header.php</code>: &#x516C;&#x5171;&#x5934;&#x90E8;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
	<span class="token variable">$copyright</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;&#x6B27;&#x9633;&#x514B;&apos;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x521B;&#x5EFA;&#x4E8C;&#x7EF4;&#x6570;&#x7EC4;&#x7528;&#x6765;&#x663E;&#x793A;&#x6240;&#x6709;&#x7684;&#x5F71;&#x89C6;&#x5267;&#x540D;&#x79F0;</span>
	<span class="token variable">$movies</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
	<span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x501A;&#x5929;&#x5C60;&#x9F99;&#x8BB0;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x90FD;&#x633A;&#x597D;&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x5982;&#x679C;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x7231;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
	<span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x590D;&#x4EC7;&#x8005;&#x8054;&#x76DF;4&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x6CE2;&#x897F;&#x7C73;&#x4E9A;&#x72C2;&#x60F3;&#x66F2;&apos;</span><span class="token punctuation">,</span><span class="token single-quoted-string string">&apos;&#x963F;&#x4E3D;&#x5854;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
	<span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;&#x60C5;&#x4E66;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x5929;&#x7A7A;&#x4E4B;&#x57CE;&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;&#x9F99;&#x732B;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x680F;&#x76EE;&#x6570;&#x7EC4;&#x7684;&#x952E;&#x540D;&#x4E0E;&#x680F;&#x76EE;&#x6587;&#x4EF6;&#x540C;&#x540D;</span>
	<span class="token variable">$navs</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;&#x597D;&#x5267;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;om&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x7F8E;&#x731B;&#x7247;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x97E9;&#x65B0;&#x7247;&apos;</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token delimiter important">?&gt;</span>

<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token constant">DOCTYPE</span> html<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>html lang<span class="token operator">=</span><span class="token double-quoted-string string">&quot;en&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>head<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta charset<span class="token operator">=</span><span class="token double-quoted-string string">&quot;UTF-8&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>link rel<span class="token operator">=</span><span class="token double-quoted-string string">&quot;stylesheet&quot;</span> href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/static/css/style.css&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>title<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>title<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>head<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>body<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5934;&#x90E8;&#x5BFC;&#x822A;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;header&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>ul <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;nav&quot;</span><span class="token operator">&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;index.php&quot;</span><span class="token operator">&gt;</span>&#x9996;&#x9875;<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$navs</span> <span class="token keyword">as</span> <span class="token variable">$key</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token variable">$nav</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
					<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$key</span></span>.&apos;.php&apos;; ?&gt; &quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$nav</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span><span class="token operator">/</span>ul<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
</pre><ul>
<li><code>footer.php</code>: &#x516C;&#x5171;&#x5E95;&#x90E8;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5E95;&#x90E8;&#x7248;&#x6743;<span class="token operator">--</span><span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;footer&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>p <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;copyright&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$copyright</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span> <span class="token operator">&amp;</span>copy<span class="token punctuation">;</span> &#x7248;&#x6743;&#x6240;&#x6709;<span class="token operator">&lt;</span><span class="token operator">/</span>p<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>body<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>html<span class="token operator">&gt;</span>
</pre><ul>
<li><code>index.php</code>: &#x9996;&#x9875;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token shell-comment comment"># &#x9B54;&#x672F;&#x5E38;&#x91CF;</span>
<span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/header.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>

	<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>

	<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;om&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>

	<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>

<span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>
</pre><ul>
<li><code>gc.php</code>: [&#x680F;&#x76EE;&#x9875;] &#x56FD;&#x4EA7;&#x539F;&#x521B;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/header.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>

	<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>img src<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/images/1.jpg&quot;</span> alt<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span> width<span class="token operator">=</span><span class="token double-quoted-string string">&quot;300&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>

<span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>
</pre><ul>
<li><code>om.php</code>: [&#x680F;&#x76EE;&#x9875;] &#x6B27;&#x7F8E;&#x731B;&#x7247;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/header.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>

	<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;om&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>img src<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/images/1.jpg&quot;</span> alt<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span> width<span class="token operator">=</span><span class="token double-quoted-string string">&quot;300&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>

<span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>
</pre><ul>
<li><code>rh.php</code>: [&#x680F;&#x76EE;&#x9875;] &#x65E5;&#x97E9;&#x63A8;&#x8350;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/header.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>

	<span class="token operator">&lt;</span>h2<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$navs</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>h2<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>img src<span class="token operator">=</span><span class="token double-quoted-string string">&quot;/images/3.jpg&quot;</span> alt<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span> width<span class="token operator">=</span><span class="token double-quoted-string string">&quot;300&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>ol<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span><span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$movie</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
		<span class="token delimiter important">&lt;?php</span> <span class="token punctuation">}</span> <span class="token delimiter important">?&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>ol<span class="token operator">&gt;</span>

<span class="token delimiter important">&lt;?php</span> <span class="token keyword">require</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>
</pre><h2 class="mume-header" id="-%E5%88%B6%E4%BD%9C%E5%85%AC%E5%85%B1%E6%A8%A1%E6%9D%BF">:-:  &#x5236;&#x4F5C;&#x516C;&#x5171;&#x6A21;&#x677F;</h2>

<h3 class="mume-header" id="1-%E4%BB%80%E4%B9%88%E6%98%AF%E6%A8%A1%E6%9D%BF">1&#x3001;&#x4EC0;&#x4E48;&#x662F;&#x6A21;&#x677F;</h3>

<ul>
<li><strong>&#x6A21;&#x677F;</strong>&#x662F;&#x7528;&#x6765;&#x5C55;&#x793A;&#x52A8;&#x6001;&#x6570;&#x636E;&#x7684;&#x8F7D;&#x4F53;</li>
<li>&#x5728;&#x5B9E;&#x9645;&#x9879;&#x76EE;&#x4E2D;, &#x8BB8;&#x591A;&#x9875;&#x9762;&#x7684;&#x7ED3;&#x6784;&#x662F;&#x5B8C;&#x5168;&#x76F8;&#x540C;&#x7684;,&#x53EA;&#x662F;&#x6570;&#x636E;&#x4E0D;&#x540C;</li>
<li>&#x5BF9;&#x4E8E;&#x8FD9;&#x4E9B;&#x9875;&#x9762;, &#x53EF;&#x4EE5;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x6A21;&#x677F;, &#x5728;&#x8C03;&#x7528;&#x65F6;&#x586B;&#x5145;&#x4E0A;&#x5BF9;&#x5E94;&#x6570;&#x636E;&#x5373;&#x53EF;</li>
<li>&#x901A;&#x8FC7;&#x6A21;&#x677F;&#x6280;&#x672F;, &#x53EF;&#x4EE5;&#x6781;&#x5927;&#x7684;&#x7B80;&#x5316;Web&#x5F00;&#x53D1;&#x5DE5;&#x4F5C;</li>
<li>PHP&#x5929;&#x751F;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x6A21;&#x677F;&#x8BED;&#x8A00;,&#x975E;&#x5E38;&#x9002;&#x5408;&#x521B;&#x5EFA;&#x8FD9;&#x79CD;&#x52A8;&#x6001;&#x9875;&#x9762;</li>
</ul>
<h3 class="mume-header" id="2-%E5%88%9B%E5%BB%BA%E6%A8%A1%E6%9D%BF%E6%95%B0%E6%8D%AE">2&#x3001;&#x521B;&#x5EFA;&#x6A21;&#x677F;&#x6570;&#x636E;</h3>

<ul>
<li>&#x5B9E;&#x9645;&#x9879;&#x76EE;&#x4E2D;, &#x6A21;&#x677F;&#x4E2D;&#x7684;&#x6570;&#x636E;&#x5E94;&#x8BE5;&#x6765;&#x81EA;&#x6570;&#x636E;&#x5E93;</li>
<li>&#x6570;&#x636E;&#x8868;&#x67E5;&#x8BE2;&#x7ED3;&#x679C;,&#x5927;&#x591A;&#x662F;&#x4E00;&#x4E2A;&#x4E8C;&#x7EF4;&#x6570;&#x7EC4;</li>
<li>&#x6240;&#x4EE5;, &#x6211;&#x4EEC;&#x5148;&#x7528;&#x4E8C;&#x7EF4;&#x6570;&#x7EC4;&#x6765;&#x6A21;&#x62DF;&#x6570;&#x636E;&#x8868;&#x4E2D;&#x7684;&#x6570;&#x636E;</li>
<li>&#x8FD9;&#x4E9B;&#x52A8;&#x6001;&#x6570;&#x636E;&#x9700;&#x8981;&#x5728;&#x591A;&#x4E2A;&#x9875;&#x9762;&#x4E2D;&#x8C03;&#x7528;,&#x6240;&#x4EE5;&#x653E;&#x5728;&#x516C;&#x5171;&#x6587;&#x4EF6;&#x4E2D;</li>
<li>&#x8FD9;&#x91CC;&#x9009;&#x62E9;&#x76F4;&#x63A5;&#x521B;&#x5EFA;&#x5728;<code>inc/header.php</code>&#x4E2D;</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
	<span class="token comment">// &#x5F71;&#x89C6;&#x5267;&#x6570;&#x7EC4;</span>
	<span class="token variable">$movies</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">1</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x501A;&#x5929;&#x5C60;&#x9F99;&#x8BB0;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;1.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x5143;&#x671D;&#x672B;&#x5E74;&#xFF0C;&#x7FA4;&#x96C4;&#x7EB7;&#x8D77;&#xFF0C;&#x6B66;&#x6797;&#x52A8;&#x8361;&#x3002;&#x6C5F;&#x6E56;&#x4F20;&#x95FB;&#xFF0C;&#x5F97;&#x5230;&#x5C60;&#x9F99;&#x5200;&#x501A;&#x5929;&#x5251;&#x8005;&#xFF0C;&#x53EF;&#x4EE5;&#x6210;&#x4E3A;&#x6B66;&#x6797;&#x81F3;&#x5C0A;&#xFF0C;&#x53F7;&#x4EE4;&#x5929;&#x4E0B;&#xFF0C;&#x83AB;&#x6562;&#x4E0D;&#x4ECE;&#x3002;&#x4E00;&#x65F6;&#x95F4;&#x98CE;&#x4E91;&#x56DB;&#x8D77;&#xFF0C;&#x5F15;&#x53D1;&#x4E86;&#x6B66;&#x6797;&#x4E2D;&#x5BF9;&#x5C60;&#x9F99;&#x5200;&#x501A;&#x5929;&#x5251;&#x7684;&#x4E89;&#x593A;&#xFF0C;&#x51E0;&#x6BB5;&#x59FB;&#x7F18;&#x548C;&#x5B7D;&#x7F18;&#x4E5F;&#x7531;&#x6B64;&#x4EA7;&#x751F;&#x3002;&#x6B66;&#x5F53;&#x6D3E;&#x5F20;&#x7FE0;&#x5C71;&#x4E0E;&#x5929;&#x9E70;&#x6559;&#x6BB7;&#x7D20;&#x7D20;&#x2026;	&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">1</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">2</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x90FD;&#x633A;&#x597D;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;2.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos; &#x82CF;&#x6BCD;&#x7684;&#x7684;&#x7A81;&#x7136;&#x79BB;&#x4E16;&#x6253;&#x7834;&#x4E86;&#x8FD9;&#x4E2A;&#x5BB6;&#x5EAD;&#x5916;&#x8868;&#x7684;&#x5E73;&#x9759;&#xFF0C;&#x610F;&#x60F3;&#x4E0D;&#x5230;&#x7684;&#x9690;&#x60A3;&#x5C42;&#x5C42;&#x663E;&#x9732;&#xFF0C;&#x5BF9;&#x6BEB;&#x65E0;&#x4E3B;&#x89C1;&#x5374;&#x53C8;&#x81EA;&#x79C1;&#x3001;&#x5C0F;&#x6C14;&#x7684;&#x82CF;&#x7236;&#x7684;&#x5B89;&#x7F6E;&#x548C;&#x540E;&#x7EED;&#x751F;&#x6D3B;&#x95EE;&#x9898;&#xFF0C;&#x5F15;&#x53D1;&#x4E86;&#x8FDC;&#x5728;&#x56FD;&#x5916;&#x7684;&#x5927;&#x54E5;&#x4E0E;&#x672C;&#x57CE;&#x7684;&#x4E8C;&#x54E5;&#x3001;&#x5C0F;&#x59B9;&#x4E09;&#x5BB6;&#x89C4;&#x5F8B;&#x751F;&#x6D3B;&#x7684;&#x4E0D;&#x518D;&#x3002;&#x4E00;&#x76F4;&#x88AB;&#x82CF;&#x6BCD;&#x538B;&#x5236;&#x7684;&#x82CF;&#x7236;&#x7FFB;&#x2026;	&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">1</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">3</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x5982;&#x679C;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x7231;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;3.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x4E00;&#x5BF9;&#x5DF2;&#x5A5A;&#x7537;&#x5973;&#x7A81;&#x7136;&#x5F87;&#x60C5;&#x81EA;&#x6740;&#xFF0C;&#x4EE5;&#x4E3A;&#x53EF;&#x4EE5;&#x7ED3;&#x675F;&#x8FD9;&#x4E00;&#x5207;&#xFF0C;&#x5374;&#x4E0D;&#x6599;&#x60B2;&#x5267;&#x624D;&#x521A;&#x521A;&#x5F00;&#x59CB;&#x2014;&#x2014;&#x4ED6;&#x4EEC;&#x7684;&#x7231;&#x4EBA;&#xFF0C;&#x803F;&#x58A8;&#x6C60;&#x548C;&#x767D;&#x8003;&#x513F;&#xFF0C;&#x540C;&#x65F6;&#x5728;&#x846C;&#x793C;&#x4E0A;&#x9082;&#x9005;&#x3002;&#x9762;&#x5BF9;&#x540C;&#x6837;&#x7684;&#x80CC;&#x53DB;&#x4ED6;&#x4EEC;&#x540C;&#x65F6;&#x9009;&#x62E9;&#x62A5;&#x590D;&#x4F46;&#x53C8;&#x540C;&#x65F6;&#x7231;&#x4E0A;&#x5F7C;&#x6B64;&#xFF0C;&#x6CE8;&#x5B9A;&#x9971;&#x53D7;&#x6253;&#x51FB;&#x548C;&#x6298;&#x78E8;&#x3002;&#x7136;&#x800C;&#x4ED6;&#x4EEC;&#x60F3;&#x771F;&#x5FC3;&#x62E5;&#x2026;	&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">1</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">4</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x590D;&#x4EC7;&#x8005;&#x8054;&#x76DF;4&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;4.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x300A;&#x590D;&#x4EC7;&#x8005;&#x8054;&#x76DF;4&#xFF1A;&#x7EC8;&#x5C40;&#x4E4B;&#x6218;&#x300B;&#x5C06;&#x662F;&#x6F2B;&#x5A01;&#x5B87;&#x5B99;&#x201C;&#x65E0;&#x9650;&#x4F20;&#x5947;&#x201D;&#xFF08;The Infinity Saga)&#x7684;&#x7EC8;&#x7ED3;&#x7BC7;&#xFF0C;&#x662F;&#x6F2B;&#x5A01;&#x7535;&#x5F71;&#x5B87;&#x5B99;&#x5341;&#x5E74;&#x7684;&#x4E00;&#x4E2A;&#x91CD;&#x8981;&#x8282;&#x70B9;&#xFF0C;&#x7ED3;&#x675F;&#x90E8;&#x5206;&#x82F1;&#x96C4;&#x7535;&#x5F71;&#x7684;&#x6545;&#x4E8B;&#xFF0C;&#x4F46;&#x4E5F;&#x5C06;&#x5C55;&#x5F00;&#x65B0;&#x7684;&#x5267;&#x60C5;&#xFF0C;&#x5448;&#x73B0;&#x65B0;&#x7684;&#x66F4;&#x4E3A;&#x5E7F;&#x9614;&#x5B8F;&#x5927;&#x7684;&#x5B87;&#x2026;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">2</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">5</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6CE2;&#x897F;&#x7C73;&#x4E9A;&#x72C2;&#x60F3;&#x66F2;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;5.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x5F17;&#x96F7;&#x8FEA;&#xB7;&#x9ED8;&#x4E18;&#x91CC;&#x6210;&#x540D;&#x524D;&#x5728;&#x673A;&#x573A;&#x505A;&#x884C;&#x674E;&#x642C;&#x8FD0;&#x5DE5;&#x3002;&#x6709;&#x4E00;&#x5929;&#xFF0C;&#x9ED8;&#x4E18;&#x91CC;&#x6BDB;&#x9042;&#x81EA;&#x8350;&#x52A0;&#x5165;&#x6770;&#xB7;&#x6CF0;&#x52D2;&#x4E0E;&#x5E03;&#x83B1;&#x6069;&#xB7;&#x6885;&#x7684;&#x4E50;&#x56E2;&#xFF0C;&#x6070;&#x5DE7;&#x5F53;&#x5929;&#x539F;&#x672C;&#x7684;&#x4E3B;&#x5531;&#x8F9E;&#x804C;&#xFF0C;&#x9ED8;&#x4E18;&#x91CC;&#x7528;&#x81EA;&#x5DF1;&#x6A2A;&#x8DE8;&#x56DB;&#x4E2A;&#x516B;&#x5EA6;&#x7684;&#x8D85;&#x5E7F;&#x97F3;&#x57DF;&#x8BF4;&#x670D;&#x4E24;&#x4EBA;&#xFF0C;&#x4ECE;&#x6B64;&#x5F00;&#x542F;&#x7687;&#x540E;&#x4E50;&#x56E2;&#x7684;&#x6447;&#x6EDA;&#x4F20;&#x5947;!&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">2</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">6</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x963F;&#x4E3D;&#x5854;:&#x6218;&#x6597;&#x5929;&#x4F7F;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;6.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x5F17;&#x96F7;&#x8FEA;&#xB7;&#x9ED8;&#x4E18;&#x91CC;&#x6210;&#x540D;&#x524D;&#x5728;&#x673A;&#x573A;&#x505A;&#x884C;&#x674E;&#x642C;&#x8FD0;&#x5DE5;&#x3002;&#x6709;&#x4E00;&#x5929;&#xFF0C;&#x9ED8;&#x4E18;&#x91CC;&#x6BDB;&#x9042;&#x81EA;&#x8350;&#x52A0;&#x5165;&#x6770;&#xB7;&#x6CF0;&#x52D2;&#x4E0E;&#x5E03;&#x83B1;&#x6069;&#xB7;&#x6885;&#x7684;&#x4E50;&#x56E2;&#xFF0C;&#x6070;&#x5DE7;&#x5F53;&#x5929;&#x539F;&#x672C;&#x7684;&#x4E3B;&#x5531;&#x8F9E;&#x804C;&#xFF0C;&#x9ED8;&#x4E18;&#x91CC;&#x7528;&#x81EA;&#x5DF1;&#x6A2A;&#x8DE8;&#x56DB;&#x4E2A;&#x516B;&#x5EA6;&#x7684;&#x8D85;&#x5E7F;&#x97F3;&#x57DF;&#x8BF4;&#x670D;&#x4E24;&#x4EBA;&#xFF0C;&#x4ECE;&#x6B64;&#x5F00;&#x542F;&#x7687;&#x540E;&#x4E50;&#x56E2;&#x7684;&#x6447;&#x6EDA;&#x4F20;&#x5947;!&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">2</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">7</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x60C5;&#x4E66;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;7.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x672C;&#x795E;&#x6237;&#x67D0;&#x4E2A;&#x98D8;&#x96EA;&#x7684;&#x51AC;&#x65E5;&#xFF0C;&#x6E21;&#x8FB9;&#x535A;&#x5B50;&#xFF08;&#x4E2D;&#x5C71;&#x7F8E;&#x7A57;&#xFF09;&#x5728;&#x524D;&#x672A;&#x5A5A;&#x592B;&#x85E4;&#x4E95;&#x6811;&#x7684;&#x4E09;&#x5468;&#x5E74;&#x796D;&#x65E5;&#x4E0A;&#x53C8;&#x4E00;&#x6B21;&#x60B2;&#x75DB;&#x5230;&#x4E0D;&#x80FD;&#x81EA;&#x5DF2;&#x3002;&#x6B63;&#x56E0;&#x4E3A;&#x65E0;&#x6CD5;&#x6291;&#x5236;&#x4F4F;&#x5BF9;&#x5DF2;&#x901D;&#x604B;&#x4EBA;&#x7684;&#x601D;&#x5FF5;&#xFF0C;&#x6E21;&#x8FB9;&#x535A;&#x5B50;&#x5728;&#x5176;&#x4E2D;&#x5B66;&#x540C;&#x5B66;&#x5F55;&#x91CC;&#x53D1;&#x73B0;&#x201C;&#x85E4;&#x4E95;&#x6811;&#x201D; &#x5728;&#x5C0F;&#x6A3D;&#x5E02;&#x8BFB;&#x4E66;&#x65F6;&#x7684;&#x5730;&#x5740;&#x65F6;&#xFF0C;&#x4F9D;&#x5FAA;&#x7740;&#x2026;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token number">3</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">8</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x5929;&#x7A7A;&#x4E4B;&#x57CE;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;8.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x97E9;&#x4E66;&#x73CD;&#x5C06;&#x4E24;&#x4E2A;&#x5973;&#x513F;&#x7684;&#x6559;&#x80B2;&#x95EE;&#x9898;&#x548C;&#x5BF9;&#x4E08;&#x592B;&#x7684;&#x8D24;&#x5185;&#x52A9;&#x5DE5;&#x4F5C;&#x90FD;&#x505A;&#x5F97;&#x4E95;&#x4E95;&#x6709;&#x6761;&#xFF0C;&#x5728;&#x5929;&#x7A7A;&#x4E4B;&#x57CE;&#x4E4B;&#x4E2D;&#x4E5F;&#x662F;&#x5907;&#x53D7;&#x77A9;&#x76EE;&#x7684;&#x5973;&#x738B;&#xFF0C;&#x4F46;&#x5176;&#x5B9E;&#x4E66;&#x73CD;&#x4E00;&#x76F4;&#x9690;&#x85CF;&#x7740;&#x4E0D;&#x4E3A;&#x4EBA;&#x6240;&#x77E5;&#x7684;&#x79D8;&#x5BC6;&#x3002;&#x674E;&#x79C0;&#x6797;&#x662F;&#x4E2A;&#x5145;&#x6EE1;&#x4E86;&#x5173;&#x6000;&#x548C;&#x60C5;&#x611F;&#x4E30;&#x6C9B;&#x7684;&#x7AE5;&#x8BDD;&#x4F5C;&#x5BB6;&#xFF0C;&#x5728;&#x4E66;&#x73CD;&#x7684;&#x5F15;&#x5BFC;&#x4E4B;&#x4E0B;&#x6210;&#x4E3A;&#x4E86;&#x5929;&#x2026;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">3</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span>
			<span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">9</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x9F99;&#x732B;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;image&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;9.jpg&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x4E3A;&#x4E86;&#x65B9;&#x4FBF;&#x59BB;&#x5B50;&#x8349;&#x58C1;&#x9756;&#x5B50;&#x517B;&#x75C5;&#xFF0C;&#x8349;&#x58C1;&#x8FBE;&#x90CE;&#x51B3;&#x5B9A;&#x5E26;&#x7740;&#x4E24;&#x4E2A;&#x5973;&#x513F;&#x8349;&#x58C1;&#x768B;&#x6708;&#x548C;&#x8349;&#x58C1;&#x7C73;&#x642C;&#x5230;&#x8349;&#x58C1;&#x9756;&#x5B50;&#x6240;&#x5728;&#x7597;&#x517B;&#x9662;&#x9644;&#x8FD1;&#x7684;&#x4E61;&#x4E0B;&#xFF0C;&#x7236;&#x5973;&#x4E09;&#x4EBA;&#x5165;&#x4F4F;&#x4E86;&#x4E00;&#x95F4;&#x5E74;&#x4E45;&#x5931;&#x4FEE;&#x7684;&#x8001;&#x623F;&#x5B50;&#x3002;&#x5C0F;&#x59D0;&#x59B9;&#x4FE9;&#x5F88;&#x5FEB;&#x53D1;&#x73B0;&#x770B;&#x4F3C;&#x5E73;&#x51E1;&#x65E0;&#x5947;&#x7684;&#x4E61;&#x4E0B;&#x6709;&#x5F88;&#x591A;&#x795E;&#x5947;&#x7684;&#x4E8B;&#x7269;&#xFF0C;&#x65E0;&#x4EBA;&#x5C45;&#x4F4F;&#x7684;&#x623F;&#x2026;&apos;</span><span class="token punctuation">,</span>
			<span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">3</span>
		<span class="token punctuation">]</span><span class="token punctuation">,</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x680F;&#x76EE;&#x6570;&#x7EC4;</span>
	<span class="token variable">$cates</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;gc&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;alias&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;&#x597D;&#x5267;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">2</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;om&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;alias&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6B27;&#x7F8E;&#x731B;&#x7247;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
		<span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">3</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;name&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;rh&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;alias&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x65E5;&#x97E9;&#x65B0;&#x7247;&apos;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
	<span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x7F51;&#x7AD9;&#x7684;&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;</span>
	<span class="token variable">$system</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
		<span class="token single-quoted-string string">&apos;sys_id&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token number">1</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;title&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x79C1;&#x4EBA;&#x5F71;&#x9662;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;desc&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x6536;&#x96C6;&#x5168;&#x7F51;&#x6700;&#x65B0;&#x6700;&#x5168;&#x7684;&#x5F71;&#x89C6;&#x8D44;&#x6E90;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;key&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;&#x56FD;&#x4EA7;,&#x6B27;&#x7F8E;,&#x65E5;&#x97E9;&apos;</span><span class="token punctuation">,</span>
		<span class="token single-quoted-string string">&apos;copy&apos;</span><span class="token operator">=</span><span class="token operator">&gt;</span><span class="token single-quoted-string string">&apos;php&#x4E2D;&#x6587;&#x7F51;&apos;</span>
	<span class="token punctuation">]</span>
<span class="token delimiter important">?&gt;</span>

<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token constant">DOCTYPE</span> html<span class="token operator">&gt;</span>
<span class="token operator">&lt;</span>html lang<span class="token operator">=</span><span class="token double-quoted-string string">&quot;en&quot;</span><span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>head<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta charset<span class="token operator">=</span><span class="token double-quoted-string string">&quot;UTF-8&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>link rel<span class="token operator">=</span><span class="token double-quoted-string string">&quot;stylesheet&quot;</span> href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;../static/css/style.css&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta name<span class="token operator">=</span><span class="token double-quoted-string string">&quot;description&quot;</span> content<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$system</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;desc&apos;</span><span class="token punctuation">]</span></span> ?&gt;&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>meta name<span class="token operator">=</span><span class="token double-quoted-string string">&quot;keywords&quot;</span> content<span class="token operator">=</span><span class="token double-quoted-string string">&quot;&lt;?php echo <span class="token interpolation"><span class="token variable">$system</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;key&apos;</span><span class="token punctuation">]</span></span> ?&gt;&quot;</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>title<span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$system</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;title&apos;</span><span class="token punctuation">]</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>title<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span><span class="token operator">/</span>head<span class="token operator">&gt;</span>
	<span class="token operator">&lt;</span>body<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">!</span><span class="token operator">--</span>&#x5934;&#x90E8;&#x5BFC;&#x822A;<span class="token operator">--</span><span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span>div <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;header&quot;</span><span class="token operator">&gt;</span>
			<span class="token operator">&lt;</span>ul <span class="token keyword">class</span><span class="token operator">=</span><span class="token double-quoted-string string">&quot;nav&quot;</span><span class="token operator">&gt;</span>
				<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;index.php&quot;</span><span class="token operator">&gt;</span>&#x9996;&#x9875;<span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$cates</span> <span class="token keyword">as</span> <span class="token variable">$cate</span><span class="token punctuation">)</span> <span class="token punctuation">:</span> <span class="token delimiter important">?&gt;</span>
					<span class="token operator">&lt;</span>li<span class="token operator">&gt;</span><span class="token operator">&lt;</span>a href<span class="token operator">=</span><span class="token double-quoted-string string">&quot;list.php?cate_id=&lt;?php echo <span class="token interpolation"><span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span></span>; ?&gt;&quot;</span><span class="token operator">&gt;</span><span class="token delimiter important">&lt;?php</span> <span class="token keyword">echo</span> <span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;alias&apos;</span><span class="token punctuation">]</span> <span class="token delimiter important">?&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>a<span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>li<span class="token operator">&gt;</span>
				<span class="token delimiter important">&lt;?php</span> <span class="token keyword">endforeach</span><span class="token punctuation">;</span> <span class="token delimiter important">?&gt;</span>
			<span class="token operator">&lt;</span><span class="token operator">/</span>ul<span class="token operator">&gt;</span>
		<span class="token operator">&lt;</span><span class="token operator">/</span>div<span class="token operator">&gt;</span>
</pre><h3 class="mume-header" id="3-%E5%88%9B%E5%BB%BA%E9%A6%96%E9%A1%B5">3&#x3001;&#x521B;&#x5EFA;&#x9996;&#x9875;</h3>

<ul>
<li><code>index.php</code>: &#x9996;&#x9875;&#x5165;&#x53E3;</li>
<li>&#x505A;&#x4E3A;&#x5165;&#x53E3;&#x6587;&#x4EF6;,&#x5FC5;&#x987B;&#x5177;&#x5907;&#x4E8C;&#x4E2A;&#x57FA;&#x672C;&#x529F;&#x80FD;
<ul>
<li>&#x663E;&#x793A;&#x51FA;&#x6574;&#x4E2A;&#x9879;&#x76EE;&#x7684;&#x57FA;&#x672C;&#x5185;&#x5BB9;</li>
<li>&#x521B;&#x5EFA;&#x5230;&#x8FBE;&#x5176;&#x5B83;&#x9875;&#x9762;&#x7684;&#x94FE;&#x63A5;&#x5165;&#x53E3;</li>
</ul>
</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
<span class="token comment">// &#x52A0;&#x8F7D;&#x516C;&#x5171;&#x5934;&#x90E8;</span>
<span class="token keyword">include</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token double-quoted-string string">&quot;/inc/header.php&quot;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x4F7F;&#x7528;&#x53CC;&#x91CD;&#x5FAA;&#x73AF;&#x6765;&#x904D;&#x5386;&#x4E8C;&#x4E2A;&#x6570;&#x7EC4;</span>
	<span class="token comment">// &#x5916;&#x5C42;&#x904D;&#x5386;&#x680F;&#x76EE;&#x6570;&#x7EC4;$cates, &#x5185;&#x5C42;&#x6839;&#x636E;&#x680F;&#x76EE;id&#x6765;&#x67E5;&#x8BE2;&#x5BF9;&#x5E94;&#x7684;&#x5F71;&#x89C6;&#x5267;&#x4FE1;&#x606F;</span>
	<span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$cates</span> <span class="token keyword">as</span> <span class="token variable">$cate</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
		<span class="token keyword">echo</span> <span class="token double-quoted-string string">&quot;&lt;h2&gt;<span class="token interpolation"><span class="token punctuation">{</span><span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;alias&apos;</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>&lt;/h2&gt;&quot;</span><span class="token punctuation">;</span>
		<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;ol&gt;&apos;</span><span class="token punctuation">;</span>

		<span class="token comment">// &#x904D;&#x5386;&#x5F71;&#x89C6;&#x5267;&#x6570;&#x7EC4;</span>
		<span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
			<span class="token comment">// &#x5224;&#x65AD;&#x5F53;&#x524D;&#x5F71;&#x89C6;&#x5267;&#x6240;&#x5C5E;&#x680F;&#x76EE;&#x662F;&#x5426;&#x4E0E;&#x5F53;&#x524D;&#x680F;&#x76EE;id&#x76F8;&#x540C;?</span>
			<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span> <span class="token operator">===</span> <span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
				<span class="token keyword">echo</span> <span class="token double-quoted-string string">&quot;&lt;li&gt;&lt;a href=&apos;detail.php?mov_id=&quot;</span> <span class="token punctuation">.</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token punctuation">]</span><span class="token punctuation">.</span> <span class="token double-quoted-string string">&quot;&apos;&gt;<span class="token interpolation"><span class="token punctuation">{</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;name&apos;</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span class="token punctuation">;</span>
			<span class="token punctuation">}</span>
		<span class="token punctuation">}</span>
		<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;/ol&gt;&apos;</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>

<span class="token comment">// &#x52A0;&#x8F7D;&#x516C;&#x5171;&#x5E95;&#x90E8;</span>
<span class="token keyword">include</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="4-%E5%88%97%E8%A1%A8%E6%A8%A1%E6%9D%BF">4&#x3001;&#x5217;&#x8868;&#x6A21;&#x677F;</h3>

<ul>
<li><code>list.php</code>: &#x680F;&#x76EE;&#x9875;&#x6A21;&#x677F;</li>
<li>&#x505A;&#x4E3A;&#x680F;&#x76EE;&#x9875;,&#x53EA;&#x9700;&#x8981;&#x5C06;<code>index.php</code>&#x6539;&#x52A8;&#x4E8C;&#x5904;&#x5373;&#x53EF;
<ul>
<li>&#x4F7F;&#x7528;GET&#x65B9;&#x5F0F;&#x63A5;&#x6536;<code>index.php</code>&#x4F20;&#x8FC7;&#x6765;&#x7684;&#x680F;&#x76EE;id</li>
<li>&#x5C06;&#x5916;&#x5C42;&#x5FAA;&#x73AF;&#x4E2D;&#x7684;&#x680F;&#x76EE;&#x540D;&#x79F0;&#x663E;&#x793A;&#x8BED;&#x53E5;&#x653E;&#x5230;&#x5185;&#x5C42;&#x5FAA;&#x73AF;&#x4E2D;</li>
</ul>
</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
<span class="token comment">// &#x52A0;&#x8F7D;&#x516C;&#x5171;&#x5934;&#x90E8;</span>
<span class="token keyword">include</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/header.php&apos;</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x5C06;&#x5F53;&#x524D;&#x680F;&#x76EE;id,, &#x4F7F;&#x7528;GET&#x65B9;&#x5F0F;,&#x901A;&#x8FC7;URL&#x5730;&#x5740;&#x4F20;&#x9012;&#x5230;&#x5217;&#x8868;&#x6A21;&#x677F;list.php</span>
	<span class="token variable">$cate_id</span> <span class="token operator">=</span> <span class="token global">$_GET</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x6CE8;&#x610F;: url&#x4E2D;&#x7684;&#x5185;&#x5BB9;&#x90FD;&#x662F;&#x5B57;&#x7B26;&#x4E32;, &#x6574;&#x6570;&#x5B57;&#x7B26;&#x4E32;&#x5148;&#x505A;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x624D;&#x53EF;&#x4EE5;</span>
	<span class="token comment">//echo gettype($cate_id);die;</span>
	<span class="token variable">$cate_id</span> <span class="token operator">=</span> <span class="token function">intval</span><span class="token punctuation">(</span><span class="token variable">$cate_id</span><span class="token punctuation">)</span><span class="token punctuation">;</span>  <span class="token comment">// &#x51FD;&#x6570;&#x8F6C;&#x6362;</span>

	<span class="token comment">// &#x5C06;index.php&#x4E2D;&#x7684;&#x4E3B;&#x4F53;&#x4EE3;&#x7801;&#x7B80;&#x5355;&#x4FEE;&#x6539;&#x4E00;&#x4E0B;</span>
	<span class="token comment">// &#x53EA;&#x663E;&#x793A;&#x4E00;&#x4E2A;&#x680F;&#x76EE;, &#x4E0D;&#x9700;&#x8981;&#x505A;&#x5FAA;&#x73AF;, &#x53EA;&#x9700;&#x8981;&#x4F5C;&#x4E00;&#x4E2A;&#x5224;&#x65AD;&#x5373;&#x53EF;</span>
	<span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$cates</span> <span class="token keyword">as</span> <span class="token variable">$cate</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
		<span class="token comment">// &#x5728;index.php&#x57FA;&#x7840;&#x4E0A;&#x52A0;&#x4E00;&#x5C42;&#x5224;&#x65AD;,&#x786E;&#x5B9A;&#x662F;&#x5426;&#x662F;&#x5F53;&#x524D;&#x680F;&#x76EE;&#x5373;&#x53EF;</span>
		<span class="token comment">// &#x5982;&#x679C;&#x4E0A;&#x9762;&#x7684;GET&#x53C2;&#x6570;&#x6CA1;&#x6709;&#x505A;&#x7C7B;&#x578B;&#x8F6C;&#x6362;, &#x90A3;&#x4E48;&#x8FD9;&#x91CC;&#x5C31;&#x4E0D;&#x80FD;&#x7528;===&#x6052;&#x7B49;</span>
		<span class="token comment">// &#x5FC5;&#x987B;&#x4F7F;&#x7528;==, &#x4EE5;&#x89E6;&#x53D1;&#x7CFB;&#x7EDF;&#x7684;&#x7C7B;&#x578B;&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x673A;&#x6389;, &#x6211;&#x8FD8;&#x662F;&#x5EFA;&#x8BAE;&#x5168;&#x7B49;&#x64CD;&#x4F5C;</span>
		<span class="token comment">// == : &#x53EA;&#x6BD4;&#x8F83;&#x503C;&#x662F;&#x5426;&#x76F8;&#x7B49;,  === : &#x503C;&#x4E0E;&#x7C7B;&#x578B;,&#x90FD;&#x5FC5;&#x987B;&#x5B8C;&#x5168;&#x76F8;&#x540C;</span>
		<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span> <span class="token operator">===</span> <span class="token variable">$cate_id</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
			<span class="token keyword">echo</span> <span class="token double-quoted-string string">&quot;&lt;h2&gt;<span class="token interpolation"><span class="token punctuation">{</span><span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;alias&apos;</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>&lt;/h2&gt;&quot;</span><span class="token punctuation">;</span>
			<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;ol&gt;&apos;</span><span class="token punctuation">;</span>
			<span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
				<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$cate</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span> <span class="token operator">==</span> <span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;cate_id&apos;</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
					<span class="token keyword">echo</span> <span class="token double-quoted-string string">&quot;&lt;li&gt;&lt;a href=&apos;detail.php?mov_id=&quot;</span> <span class="token punctuation">.</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token punctuation">]</span><span class="token punctuation">.</span> <span class="token double-quoted-string string">&quot;&apos;&gt;<span class="token interpolation"><span class="token punctuation">{</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;name&apos;</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span class="token punctuation">;</span>
				<span class="token punctuation">}</span>
			<span class="token punctuation">}</span>
			<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;/ol&gt;&apos;</span><span class="token punctuation">;</span>
			<span class="token keyword">break</span><span class="token punctuation">;</span> <span class="token comment">// &#x7ED3;&#x675F;&#x5FAA;&#x73AF;</span>
		<span class="token punctuation">}</span><span class="token punctuation">;</span>
	<span class="token punctuation">}</span>

<span class="token comment">// &#x52A0;&#x8F7D;&#x516C;&#x5171;&#x5E95;&#x90E8;</span>
<span class="token keyword">include</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="5-%E5%86%85%E5%AE%B9%E9%A1%B5%E6%A8%A1%E6%9D%BF">5&#x3001;&#x5185;&#x5BB9;&#x9875;&#x6A21;&#x677F;</h3>

<ul>
<li><code>detail.php</code>: &#x8BE6;&#x60C5;&#x9875;&#x6A21;&#x677F;</li>
<li>&#x505A;&#x4E3A;&#x8BE6;&#x60C5;&#x9875;, &#x53EA;&#x9700;&#x8981;&#x5C06;<code>list.php</code>&#x6539;&#x52A8;&#x4E09;&#x5904;&#x5373;&#x53EF;
<ul>
<li>GET&#x53C2;&#x6570;&#x63A5;&#x6536;&#x7684;&#x5F71;&#x89C6;&#x5267;&#x7684;id</li>
<li>&#x53BB;&#x6389;&#x5916;&#x5C42;&#x5FAA;&#x73AF;, &#x4E0D;&#x9700;&#x8981;&#x904D;&#x5386;&#x680F;&#x76EE;</li>
<li>&#x6DFB;&#x52A0;&#x4E00;&#x4E9B;&#x81EA;&#x5B9A;&#x4E49;&#x6837;&#x5F0F;,&#x663E;&#x793A;&#x5F71;&#x89C6;&#x5267;&#x8BE6;&#x60C5;&#x5185;&#x5BB9;</li>
</ul>
</li>
</ul>
<pre data-role="codeBlock" data-info="php" class="language-php"><span class="token delimiter important">&lt;?php</span>
<span class="token comment">// &#x52A0;&#x8F7D;&#x516C;&#x5171;&#x5934;&#x90E8;</span>
<span class="token keyword">include</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/header.php&apos;</span><span class="token punctuation">;</span>

	<span class="token variable">$mov_id</span> <span class="token operator">=</span> <span class="token function">intval</span><span class="token punctuation">(</span><span class="token global">$_GET</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

	<span class="token comment">// &#x590D;&#x5236;list.php&#x6A21;&#x677F;&#x76F4;&#x63A5;&#x4FEE;&#x6539;</span>
	<span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$movies</span> <span class="token keyword">as</span> <span class="token variable">$movie</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
		<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;mov_id&apos;</span><span class="token punctuation">]</span> <span class="token operator">===</span> <span class="token variable">$mov_id</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
			<span class="token keyword">echo</span> <span class="token double-quoted-string string">&quot;&lt;h3&gt;<span class="token interpolation"><span class="token punctuation">{</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;name&apos;</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>&lt;/h3&gt;&quot;</span><span class="token punctuation">;</span>
			<span class="token keyword">echo</span> <span class="token single-quoted-string string">&apos;&lt;img src=&quot;/images/&apos;</span><span class="token punctuation">.</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;image&apos;</span><span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token single-quoted-string string">&apos;&quot; alt=&quot;&quot; width=&quot;300&quot;&gt;&apos;</span><span class="token punctuation">;</span>
			<span class="token keyword">echo</span> <span class="token double-quoted-string string">&quot;&lt;p style=&apos;text-indent: 2em&apos;&gt;<span class="token interpolation"><span class="token punctuation">{</span><span class="token variable">$movie</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;detail&apos;</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>&lt;/p&gt;&quot;</span><span class="token punctuation">;</span>
		<span class="token punctuation">}</span>
	<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token comment">// &#x52A0;&#x8F7D;&#x516C;&#x5171;&#x5E95;&#x90E8;</span>
<span class="token keyword">include</span> <span class="token constant">__DIR__</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">&apos;/inc/footer.php&apos;</span><span class="token punctuation">;</span>
</pre>
      </div>
      
      
    
    
    
    
    
    
    
    
  
    </body></html>